package zy0133;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class question2 {
	public static void main(String[] args) throws Exception {
		BufferedReader br=new BufferedReader(new FileReader("data.txt"));
		StringBuilder sb = new StringBuilder();
		String line;
		while((line=br.readLine())!=null){
			sb.append(line).append("\n");
		}
		Map<String, Integer> map = new HashMap<String, Integer>();		
		Pattern pattern = Pattern.compile("0~30:(\\d+),30-60:(\\d+)");
		Matcher matcher = pattern.matcher(sb);
		int time=1;
		while(matcher.find()){
			map.put("0"+time+"30", Integer.parseInt(matcher.group(1)));
			map.put("0"+time+"60", Integer.parseInt(matcher.group(2)));
			time++;
		}
		map.keySet().stream().forEach(key->System.out.print("<"+key+","+map.get(key)+">"));
	}
}
